package com.example.miiiitia.androiddemo.fragment;

import android.app.Fragment;
import android.app.FragmentManager;
import android.app.FragmentTransaction;
import android.net.Uri;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;

import com.example.miiiitia.androiddemo.R;

public class FragmentMainActivity extends AppCompatActivity implements ClockFragment.OnFragmentInteractionListener{



    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_fragment_main);

        setTitle("FragmentDemo");


        FragmentManager fmgr = getFragmentManager();
        FragmentTransaction transaction = fmgr.beginTransaction();

        Fragment clockFragment = ClockFragment.newInstance("uri1", "uri2");
        transaction.replace(R.id.clockFragment, clockFragment);
        transaction.commit();

    }

    @Override
    public void onFragmentInteraction(Uri uri) {

    }
}
